load(
    "//tools/skylark:drake_cc.bzl",
    "drake_cc_binary",
    "drake_cc_googletest",
    "drake_cc_library",
    "drake_cc_package_library",
)
load("//tools/lint:lint.bzl", "add_lint_tests")

package(default_visibility = ["//visibility:public"])

drake_cc_package_library(
    name = "constraint",
    visibility = ["//visibility:public"],
    deps = [
        ":constraint_problem_data",
        ":constraint_solver",
    ],
)

drake_cc_library(
    name = "constraint_problem_data",
    hdrs = [
        "constraint_problem_data.h",
    ],
    deps = [
        "//common:essential",
    ],
)

drake_cc_library(
    name = "constraint_solver",
    srcs = ["constraint_solver.cc"],
    hdrs = [
        "constraint_solver.h",
    ],
    deps = [
        ":constraint_problem_data",
        "//solvers:moby_lcp_solver",
    ],
)

# === test/ ===

drake_cc_googletest(
    name = "constraint_solver_test",
    deps = [
        ":constraint_solver",
        "//examples/rod2d",
        "//solvers:moby_lcp_solver",
        "//solvers:unrevised_lemke_solver",
    ],
)

add_lint_tests(enable_clang_format_lint = False)
